import Vue from 'vue'

import 'normalize.css/normalize.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/icon.css'

import '@/styles/index.scss' 

import App from './App'
import router from './router'
import store from '@/store'

import '@/icons' 
import '@/permission'
import './directive'
Vue.use(ElementUI)

Vue.config.productionTip = false

// 添加按钮权限控制方法
Vue.prototype.$hasButton = function(buttonName) {
  return store.getters.buttons.includes(buttonName)
}

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
